package com.wangshidai.service.impl;

import com.wangshidai.entity.Dept;
import com.wangshidai.mapper.DeptMapper;
import com.wangshidai.mapper.impl.DeptMapperImpl;
import com.wangshidai.service.DeptService;

import java.util.List;

public class DeptServiceImpl implements DeptService { //业务逻辑层

    private DeptMapper deptMapper=new DeptMapperImpl();

    @Override
    public void saveDept(Dept dept) {
         //业务逻辑判断 ，不如dept参数不能为null   部门名称不能重复
        if (dept==null){
            return;
        }
         deptMapper.saveDept(dept);
    }

    @Override
    public void updateDept(Dept dept) {

    }

    @Override
    public void deleteDept(int did) {

    }

    @Override
    public List<Dept> queryDepts() {
        return null;
    }
}
